package com.calligraphy.product.service.impl;

import com.calligraphy.product.mapper.ProductSecKillMapper;
import com.calligraphy.product.service.SeckillService;
import com.calligraphy.product.vo.SecKillInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author hy
 * @Date 2019/1/10 15:08
 **/
@Service
public class SeckillServiceImpl implements SeckillService {

    @Autowired
    private ProductSecKillMapper mapper;

    @Override
    public List<SecKillInfoVO> findSecKillList() {
        List<SecKillInfoVO> secKillInfoVOS = mapper.findSecKillList();
        return secKillInfoVOS;
    }

    @Override
    public SecKillInfoVO findSecKillInfo(String productId) {
        SecKillInfoVO secKillInfoVO = mapper.findSecKillDetail(productId);
        return secKillInfoVO;
    }
}
